Many embedded systems such as digital cameras, digital radios, high-resolution printers, cellular phones, etc. involve the heavy use of signal processing. Such systems are based on embedded Digital Signal Processors (DSPs). An embedded DSP typically integrates a processor core, a program memory device, and application-specific circuitry on a single integrated circuit die. Therefore, because of size constraints, memory in an embedded DSP system is often a limited resource.
A processing core in a DSP typically executes instructions in a tight loop and performs many of the same types of operations. Consequently, many of the same instructions executed in the core are repetitively fetched from memory. Notwithstanding looping, function calls and repeat instructions, there are instances where identical instructions are fetched. Therefore, an optimization method that utilizes repetitive and identical function calls by a processor core to reduce the size of the generated code in order to optimize memory devices used in embedded systems is desired.